package mapper;

import entity.Resource;
import entity.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface RoleMapper {
    //插入角色
    int insert(Role role);
    //查询所有角色
    List<Role> selectAll();

    int delete(Integer id);

    int update(Role role);

    Role selectById(Integer id);

    List<Resource> selectByRoleId(Integer roleid);
    @Select("select * from T_ROLE")
    List<Role> selectByRole(Map<String, Object> params);

    Role selectByMap(Map<String,Object> map);

    int batchDelete(Integer[] ids);
}
